﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;

public partial class Titulados : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Session["CadenaDeConexion"] = ConfigurationManager.ConnectionStrings["RFID"].ConnectionString;
    }
    protected void LinkButtonAddNew_Click(object sender, EventArgs e)
    {
        FormViewTitulados.ChangeMode(FormViewMode.Insert);
        ((Calendar)FormViewTitulados.FindControl("CalendarFechaDeIniciacion")).SelectedDate = DateTime.Now;
        ((Calendar)FormViewTitulados.FindControl("CalendarFechaDeFinalizacion")).SelectedDate = DateTime.Now;
    }
    protected void FormViewTitulados_ItemInserted(object sender, FormViewInsertedEventArgs e)
    {
        limpiarFormulario();
    }
    protected void InsertCancelButton_Click(object sender, EventArgs e)
    {
        limpiarFormulario();
    }
    private void limpiarFormulario()
    {
        FormViewTitulados.Controls.Clear();
        FormViewTitulados.ChangeMode(FormViewMode.ReadOnly);
    }
    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    {

    }
    protected void CoordinadorTextBox_TextChanged(object sender, EventArgs e)
    {

    }
    protected void InsertButton_Click(object sender, EventArgs e)
    {

    }
    protected void ObjectDataSourceTitulados_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
    {
        LabelEntrada.Text = e.OutputParameters["mensaje"].ToString();
    }
}
